package com.mdz.sbgl.Mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.mdz.sbgl.Entity.Cgrk;
import com.mdz.sbgl.Entity.Sysobjects;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 孟德志
 * @since 2020-12-18
 */
public interface SysobjectsMapper extends BaseMapper<Sysobjects> {

    @Select("select id,name as dbname from sysobjects WHERE TYPE = 'U'")
    public List<Sysobjects> getdbname();

    @Delete("delete from ${dbname} where gsid=${gsid} and gsid <>'admin'")
    public Integer deletedb(String dbname,String gsid);
}
